/*    */ package com.qmsk.business.prize.sweepstakes.dao;
/*    */ 
/*    */ import com.qmsk.business.sys.basic.SupportDAO;
/*    */ import com.utils.gson.in.GsonHeadOneRow;
/*    */ import com.utils.gson.out.GsonEbRst;
/*    */ import java.sql.SQLException;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ 
/*    */ public class SweepstakesDao extends SupportDAO
/*    */ {
/*    */   public GsonHeadOneRow getPrizeTypeId(Integer swpId)
/*    */     throws SQLException
/*    */   {
/* 28 */     Object[] params = { swpId };
/* 29 */     return getOneRowOfParams("selectGetPrizeTypeId", params);
/*    */   }
/*    */ 
/*    */   public Integer getParticNums(Object swpId) throws SQLException {
/* 33 */     Object[] params = { swpId };
/* 34 */     return queryForInt("selectGetParticNums", params, Integer.valueOf(0));
/*    */   }
/*    */ 
/*    */   public GsonEbRst getSweepstakesList(Map<String, Object> params, Integer pageIndex, Short nPageSize) throws SQLException
/*    */   {
/* 39 */     if (pageIndex.intValue() > 0) {
/* 40 */       pageIndex = Integer.valueOf(pageIndex.intValue() - 1);
/*    */     }
/* 42 */     return getGsonOfParams("selectSqlOfAll", params, pageIndex, nPageSize, true);
/*    */   }
/*    */ 
/*    */   public int updateSweepstakesStatuse(Integer swpId, Integer status) throws SQLException {
/* 46 */     Object[] params = { status, swpId };
/* 47 */     return update("updateSqlStatusOfSwpId", params);
/*    */   }
/*    */ 
/*    */   public int updateparticNums(Integer count, Integer swpId) throws SQLException {
/* 51 */     Object[] params = { count, swpId };
/* 52 */     return update("updateSqlparticNums", params);
/*    */   }
/*    */ 
/*    */   public GsonEbRst getSweepstakesListLast(Map<String, Object> params) throws SQLException {
/* 56 */     return getGsonOfParams("selectSqlOfAll", params, Integer.valueOf(0), Short.valueOf((short) 1), true);
/*    */   }
/*    */ 
/*    */   public GsonEbRst getSweepstakesById(Long id) throws SQLException
/*    */   {
/* 61 */     Map params = new HashMap();
/* 62 */     params.put("id", id);
/* 63 */     return getGsonOfParams("selectSqlOfAll", params, Integer.valueOf(0), Short.valueOf((short) 1), true);
/*    */   }
/*    */ 
/*    */   public GsonHeadOneRow checkExistOfSwpIdAndPrizeLeveAndIntRule(Long swpId, Long prizeLevelId) throws SQLException {
/* 67 */     Object[] params = { swpId, prizeLevelId };
/* 68 */     return getOneRowOfParams("checkExistOfSwpIdAndPrizeLeveAndIntRule", params);
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.prize.sweepstakes.dao.SweepstakesDao
 * JD-Core Version:    0.5.3
 */